<?php 
if(!session_id())
    session_start(); 
?>
<?php  include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/DonHang.php'; ?>
<?php  include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/User.php'; ?>
<?php 
$dhOb = new DonHang();
$userOb = new User();
if($userOb->daDangNhap()){
    if($dhOb->capNhatHoaDon($_SESSION)){
        header("Location: /?status=1");
    }else{
        header("Location: /thanhtoan.php?status=1");
    }
}else{
    header("Location: /thanhtoan.php?status=2");
}
?>